package com.lst.tools.wx.smallroutine.service;


import com.lst.tools.wx.smallroutine.entity.WxBasicAccessToken;
import com.lst.tools.wx.smallroutine.vo.*;
import com.lst.tools.wx.smallroutine.vo.*;

import java.io.IOException;
import java.io.InputStream;

/**
 * @author: Frank
 * @date: 2019/09/24 13:51
 * @version: V1.0
 */
public interface IWxSmallRoutineService {
    /**
     * 获取openId和UnionId
     *
     * @param smallRoutineEncryptedDataParam 需要的参数
     * @return
     */
    SmallRoutineIdVo getOpenIdAndUnionId(SmallRoutineEncryptedDataParam smallRoutineEncryptedDataParam);

    /**
     * 获取微信绑定手机
     *
     * @param smallRoutineEncryptedDataParam 需要的参数
     * @return
     */
    SmallRoutineMobileDataVo getMobileData(SmallRoutineEncryptedDataParam smallRoutineEncryptedDataParam);

    /**
     * 获取普通access_token
     *
     * @param wxCatchBasicAccessTokenParam 需要的参数
     * @return
     */
    WxBasicAccessToken getWxBasicAccessToken(WxCatchBasicAccessTokenParam wxCatchBasicAccessTokenParam);

    /**
     * 获取小程序二维码
     *
     * @param basicAccessToken        普通accessToken
     * @param smallRoutineQRCodeParam 需要的参数
     * @return
     * @throws IOException
     */
    InputStream getSmallRoutineQRCode(String basicAccessToken, SmallRoutineQRCodeParam smallRoutineQRCodeParam) throws IOException;

    /**
     * 发送微信小程序模板消息
     *
     * @param accessToken                      调用凭据
     * @param smallRoutineTemplateMessageParam 消息参数
     * @return
     */
    boolean sendTemplateMessage(String accessToken, SmallRoutineTemplateMessageParam smallRoutineTemplateMessageParam);
}
